package com.bzframework.pro.notify.email.configuration;

import com.bzframework.pro.notify.email.DefaultEmailManager;
import com.bzframework.pro.notify.email.EmailManager;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.core.ReactiveRedisOperations;
import org.springframework.mail.javamail.JavaMailSender;

/**
 * @Author bingzhong
 * @Date 2025/1/23 11:57
 * @Description
 */
@Configuration
public class EmailConfiguration {

    @Bean
    public EmailManager emailProvider(JavaMailSender javaMailSender,
                                      ReactiveRedisOperations<String, String> redisOperations,
                                      freemarker.template.Configuration freemarkerConfiguration){
        return new DefaultEmailManager(javaMailSender, redisOperations, freemarkerConfiguration);
    }

}
